<?php /* Smarty version 2.6.26, created on 2012-05-12 15:00:38
         compiled from C:%5CWampDeveloper%5CWebsites%5Cwww.siyaradiali.com%5Cwebroot%5Cplugins%5Cbrowse_map%5Cmap.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'replace', 'C:\\WampDeveloper\\Websites\\www.siyaradiali.com\\webroot\\plugins\\browse_map\\map.tpl', 8, false),)), $this); ?>
<!-- browser map tpl -->

<?php if ($this->_tpl_vars['config']['browse_map_module']): ?>

	<?php if ($this->_tpl_vars['pageInfo']['Key'] == 'listings'): ?>
		<?php $_from = $this->_tpl_vars['listing_types']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['tabsF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['tabsF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['lt_key'] => $this->_tpl_vars['tab']):
        $this->_foreach['tabsF']['iteration']++;
?>
			<?php if ($this->_tpl_vars['requested_type'] == $this->_tpl_vars['lt_key']): ?>
				<?php $this->assign('bmFirstKey', ((is_array($_tmp=$this->_tpl_vars['lt_key'])) ? $this->_run_mod_handler('replace', true, $_tmp, '_', '') : smarty_modifier_replace($_tmp, '_', ''))); ?>
			<?php endif; ?>
			<div class="bm_maps<?php if ($this->_tpl_vars['requested_type'] != $this->_tpl_vars['lt_key']): ?> hide<?php endif; ?>" <?php if (! $this->_tpl_vars['block']['Tpl']): ?>style="padding: 0 0 10px;"<?php endif; ?>>
				<div class="<?php if (! $this->_tpl_vars['block']['Tpl']): ?>highlight highlight_loading<?php endif; ?>" id="bm_map_<?php echo ((is_array($_tmp=$this->_tpl_vars['lt_key'])) ? $this->_run_mod_handler('replace', true, $_tmp, '_', '') : smarty_modifier_replace($_tmp, '_', '')); ?>
" style="<?php if ($this->_tpl_vars['config']['browse_map_width']): ?>width: <?php echo $this->_tpl_vars['config']['browse_map_width']; ?>
px;<?php endif; ?>height: <?php if ($this->_tpl_vars['config']['browse_map_height']): ?><?php echo $this->_tpl_vars['config']['browse_map_height']; ?>
<?php else: ?>250<?php endif; ?>px;"></div>
			</div>
		<?php endforeach; endif; unset($_from); ?>
	<?php else: ?>
		<div <?php if (! $this->_tpl_vars['block']['Tpl']): ?>style="padding: 0 0 10px;"<?php endif; ?>>
			<div class="<?php if (! $this->_tpl_vars['block']['Tpl']): ?>highlight highlight_loading<?php endif; ?>" id="bm_map" style="<?php if ($this->_tpl_vars['config']['browse_map_width']): ?>width: <?php echo $this->_tpl_vars['config']['browse_map_width']; ?>
px;<?php endif; ?>height: <?php if ($this->_tpl_vars['config']['browse_map_height']): ?><?php echo $this->_tpl_vars['config']['browse_map_height']; ?>
<?php else: ?>250<?php endif; ?>px;"></div>
		</div>
	<?php endif; ?>

	<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false<?php if (@RL_LANG_CODE != '' && @RL_LANG_CODE != 'en'): ?>&amp;language=<?php echo @RL_LANG_CODE; ?>
<?php endif; ?>"></script>
	<script type="text/javascript" src="http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;key=<?php echo $this->_tpl_vars['config']['google_map_key']; ?>
"></script>
	<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
jquery/jquery.flmap.js"></script>
	<script type="text/javascript" src="<?php echo @RL_PLUGINS_URL; ?>
browse_map/static/lib.js"></script>
	<script type="text/javascript">//<![CDATA[

	/* populate markers */
	<?php $this->assign('bm_index', 0); ?>
	<?php $_from = $this->_tpl_vars['listings']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['bm_listing']):
?>
		<?php if ($this->_tpl_vars['bm_listing']['Loc_latitude'] && $this->_tpl_vars['bm_listing']['Loc_longitude']): ?>
			browseMap.markers.push(new Array('<?php echo $this->_tpl_vars['bm_listing']['Loc_latitude']; ?>
,<?php echo $this->_tpl_vars['bm_listing']['Loc_longitude']; ?>
', lang['loading'], 'direct', '<?php echo $this->_tpl_vars['bm_listing']['ID']; ?>
'));
			browseMap.mapping[<?php echo $this->_tpl_vars['bm_listing']['ID']; ?>
] = <?php echo $this->_tpl_vars['bm_index']; ?>
;
			<?php $this->assign('bm_index', $this->_tpl_vars['bm_index']+1); ?>
		<?php endif; ?>
	<?php endforeach; endif; unset($_from); ?>
	
	/* populate phrases */
	browseMap.phrases['hide'] = '<?php echo $this->_tpl_vars['lang']['hide']; ?>
';
	browseMap.phrases['show'] = '<?php echo $this->_tpl_vars['lang']['show']; ?>
';
	browseMap.phrases['notFound'] = '<?php echo $this->_tpl_vars['lang']['location_not_found']; ?>
';
	
	/* populate configs */
	browseMap.config['use_letters'] = <?php if ($this->_tpl_vars['config']['browse_map_letters']): ?>true<?php else: ?>false<?php endif; ?>;
	
	<?php echo '

	/* populate local search data */
	browseMap.localSearch = '; ?>
<?php if ($this->_tpl_vars['config']['browse_map_amenities']): ?><?php echo '{
		caption: \''; ?>
<?php echo $this->_tpl_vars['lang']['local_amenity']; ?>
<?php echo '\',
		services: ['; ?>

			<?php $_from = $this->_tpl_vars['amenities']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['amenityF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['amenityF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['amenity']):
        $this->_foreach['amenityF']['iteration']++;
?>
			['<?php echo $this->_tpl_vars['amenity']['Key']; ?>
', '<?php echo $this->_tpl_vars['amenity']['name']; ?>
', <?php if ($this->_tpl_vars['amenity']['Default']): ?>'checked'<?php else: ?>false<?php endif; ?>]<?php if (! ($this->_foreach['amenityF']['iteration'] == $this->_foreach['amenityF']['total'])): ?>,<?php endif; ?>
			<?php endforeach; endif; unset($_from); ?>
		<?php echo ']
	}'; ?>
<?php else: ?><?php echo 'false'; ?>
<?php endif; ?><?php echo ';
	
	$(document).ready(function(){
		/* load map */
		browseMap.recentlyReload(flynax.getHash() ? flynax.getHash().replace(/_/g, \'\') : \''; ?>
<?php echo $this->_tpl_vars['bmFirstKey']; ?>
<?php echo '\');
	});
	'; ?>

	
	//]]>
	</script>

<?php else: ?>

	<?php echo $this->_tpl_vars['lang']['browseMap_module_disabled']; ?>


<?php endif; ?>

<?php if ($this->_tpl_vars['pageInfo']['Key'] == 'listings'): ?>
	<script type="text/javascript">
	<?php echo '
	
	$(document).ready(function(){
		$(\'div.tabs ul li\').click(function(){
			var key = $(this).attr(\'lang\').replace(/_/g, \'\');
			$(\'div.bm_maps\').hide();
			$(\'div#bm_map_\'+key).parent().show();
			
			if ( $(\'div#area_\'+key).find(\'div#listings\').length <= 0 )
			{
				$(\'div.bm_maps:first\').parent().hide();
			}
			else
			{
				$(\'div.bm_maps:first\').parent().show();
			}
		});
	});
	
	'; ?>

	</script>
<?php endif; ?>

<!-- browser map tpl end -->